<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:template match="/">
  <xsl:apply-templates /> 
</xsl:template>

<xsl:template match="component">
	<span>
		<xsl:attribute name="id">
			<xsl:value-of select="@id"/>
		</xsl:attribute>
			
			<iframe frameborder="0" scrolling="no" allowtransparency="1">
				<xsl:attribute name="id">
					<xsl:text>upload_iframe_</xsl:text><xsl:value-of select="@id"/>
				</xsl:attribute>
				<xsl:attribute name="style">
					<xsl:for-each select="property/property">
						<xsl:if test="@key='Width'">
							<xsl:text>width:</xsl:text><xsl:value-of select="." /><xsl:text>px;</xsl:text>
						</xsl:if>
						<xsl:if test="@key='Height'">
							<xsl:text>height:</xsl:text><xsl:value-of select="." /><xsl:text>px;</xsl:text>
						</xsl:if>
					</xsl:for-each>
					<xsl:text> overflow:hidden; border: none none;</xsl:text>
				</xsl:attribute>
				<xsl:attribute name="src">
					<xsl:text>../store/other/not2include/TextEditor/text_editor.php?text_comp_id=</xsl:text>
					<xsl:text>text_</xsl:text><xsl:value-of select="@id"/>
				</xsl:attribute>
			</iframe> 

			<input type="hidden">
				<xsl:attribute name="id">
					<xsl:text>text_</xsl:text><xsl:value-of select="@id"/>
				</xsl:attribute>
				
				<xsl:attribute name="databind">
					<xsl:value-of select="@id"/><xsl:text>_text</xsl:text>
				</xsl:attribute>
				
				<xsl:for-each select="property/property">
					<xsl:if test="@key='Text'">
						<xsl:attribute name="value">
							<xsl:value-of select="."/>
						</xsl:attribute>
					</xsl:if>
				</xsl:for-each>
			</input>
	</span>
</xsl:template>
</xsl:stylesheet>